﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using System.Runtime.Serialization;

namespace mrp16062010
{
    [Serializable()]
    class Mamul:Stok, ISerializable
    {
        public string Id { get; set; }
        public Mamul()
        {
        }
        public Mamul(List<Stok> Bilesen)
        {
            BilesenList = Bilesen;
        }
        
        public void Ekle(Stok stok)
        {
            BilesenList.Add(stok);
            stok.Ust = this;
        }

        public void Sil(Stok stok)
        {
            BilesenList.Remove(stok);
        }

        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            Serialize.InfoCopier.Write(info, this);
        }

        public Mamul(SerializationInfo info, StreamingContext context)
        {
            Serialize.InfoCopier.Read(info, this);
        }
    }
}
